package com.ruoyi.spot.openapi.lastesttrade.service.impl;

import java.util.List;

import com.ruoyi.spot.openapi.lastesttrade.domain.VO.SpotOpenapiLastestTradationVO;
import com.ruoyi.spot.openapi.lastesttrade.mapper.SpotOpenapiLastestTradationMapper;
import com.ruoyi.spot.openapi.quotesTicker.domain.VO.SpotOpenapiQuotesTickerVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
//import com.ruoyi.spot.openapi.lastesttrade.mapper.SpotOpenapiLastestTradationMapper;
import com.ruoyi.spot.openapi.lastesttrade.domain.SpotOpenapiLastestTradation;
import com.ruoyi.spot.openapi.lastesttrade.service.ISpotOpenapiLastestTradationService;

/**
 * 最近成交Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-12
 */
@Service
public class SpotOpenapiLastestTradationServiceImpl implements ISpotOpenapiLastestTradationService 
{
    @Autowired
    private SpotOpenapiLastestTradationMapper spotOpenapiLastestTradationMapper;

    /**
     * 查询最近成交
     * 
     * @param id 最近成交主键
     * @return 最近成交
     */
    @Override
    public SpotOpenapiLastestTradationVO selectSpotOpenapiLastestTradationById(Integer id)
    {
        return spotOpenapiLastestTradationMapper.selectSpotOpenapiLastestTradationById(id);
    }

    /**
     * 查询最近成交列表
     * 
     * @param spotOpenapiLastestTradation 最近成交
     * @return 最近成交
     */
    @Override
    public List<SpotOpenapiLastestTradationVO> selectSpotOpenapiLastestTradationList(SpotOpenapiLastestTradationVO spotOpenapiLastestTradation)
    {
        return spotOpenapiLastestTradationMapper.selectSpotOpenapiLastestTradationList(spotOpenapiLastestTradation);
    }

    /**
     * 新增最近成交
     * 
     * @param spotOpenapiLastestTradation 最近成交
     * @return 结果
     */
    @Override
    public int insertSpotOpenapiLastestTradation(SpotOpenapiLastestTradation spotOpenapiLastestTradation)
    {
        return spotOpenapiLastestTradationMapper.insertSpotOpenapiLastestTradation(spotOpenapiLastestTradation);
    }

    /**
     * 修改最近成交
     * 
     * @param spotOpenapiLastestTradation 最近成交
     * @return 结果
     */
    @Override
    public int updateSpotOpenapiLastestTradation(SpotOpenapiLastestTradation spotOpenapiLastestTradation)
    {
        return spotOpenapiLastestTradationMapper.updateSpotOpenapiLastestTradation(spotOpenapiLastestTradation);
    }

    /**
     * 批量删除最近成交
     * 
     * @param ids 需要删除的最近成交主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiLastestTradationByIds(Integer[] ids)
    {
        return spotOpenapiLastestTradationMapper.deleteSpotOpenapiLastestTradationByIds(ids);
    }

    /**
     * 删除最近成交信息
     * 
     * @param id 最近成交主键
     * @return 结果
     */
    @Override
    public int deleteSpotOpenapiLastestTradationById(Integer id)
    {
        return spotOpenapiLastestTradationMapper.deleteSpotOpenapiLastestTradationById(id);
    }

    @Override
    public List<SpotOpenapiLastestTradationVO> selectSpotAllData() {
        return spotOpenapiLastestTradationMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotOpenapiLastestTradationMapper.queryCurryNumber(currencyPair);
    }
}
